/**
 *  Copyright (c)  2010  Angel Ortiz.
 *  Permission is granted to copy, distribute and/or modify this document
 *  under the terms of the GNU Free Documentation License, Version 1.3
 *  or any later version published by the Free Software Foundation;
 *  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 *  A copy of the license is included in the section entitled "GNU
 *  Free Documentation License". 
 */

package view;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JPanel;

import data.Images;

/**
 * @author Angel Ortiz
 * @date 03/19/2010 This class manages the image background of the standard
 *       overview
 */
public class OverviewBackgroundGUI extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2002796307243896442L;
	private Images images;
	private int height, width, xCoordinate, yCoordinate;

	public OverviewBackgroundGUI(Images images) {
		this.images = images;
		this.setFocusable(false);
		this.setOpaque(false);

		this.setLocation(0, 0);
		height = 600;
		width = 1024;
		xCoordinate = 0;
		yCoordinate = 0;

		this.setSize(width, height);
		this.setLocation(xCoordinate, yCoordinate);
	}

	public void paint(Graphics g) {
		this.setSize(width, height);
		this.setLocation(xCoordinate, yCoordinate);

		g.drawImage(images.getImage("gui_overview"), 0, 0, this);
	}
}
